exports.__esModule = true;

function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }

exports.default = class extends think.BaseController {

    /**
     * 部门评价
     */
    getOrgEvalAction() {
        var _this = this;

        return _asyncToGenerator(function* () {
            let aj = think.ajaxJson();
            const OrgService = _this.service('overallmerit/OrgService');
            const data = {
                cycle: Number(_this.get('cycle')),
                rangeDate: _this.get('rangeDate'),
                orgList: _this.get('orgList')
            };
            const res = yield OrgService.getOrgEval(data);
            if (!res.error) {
                aj.result = res;
            } else {
                aj.success = false;
                aj.msg = '查询失败';
            }
            return _this.json(aj);
        })();
    }
    /**
    * 按部门查询超期|驳回案卷列表
    */
    getCaseListByAction() {
        var _this2 = this;

        return _asyncToGenerator(function* () {
            let aj = think.ajaxJson();
            const OrgService = _this2.service('overallmerit/OrgService');
            const data = {
                cycle: Number(_this2.get('cycle')),
                rangeDate: _this2.get('rangeDate'),
                orgid: Number(_this2.get('orgid')),
                type: Number(_this2.get('type'))
            };
            const res = yield OrgService.getCaseListBy(data);
            if (!res.error) {
                aj.result = res;
            } else {
                aj.success = false;
                aj.msg = '查询失败';
            }
            return _this2.json(aj);
        })();
    }

};